package flex.cc.order.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import flex.cc.order.manage.dao.OrderPolicyDao;
import flex.cc.order.manage.dto.order.OrderPolicyEntity;
import flex.cc.order.manage.service.OrderPolicyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @author wkangle
 * @className OrderCustomerServiceImpl
 * @description 服务单保单信息service实现类
 * @time 2021-09-06 15:53:10
 */
@Service("OrderPolicyService")
@Transactional(rollbackFor = Exception.class)
public class OrderPolicyServiceImpl extends ServiceImpl<OrderPolicyDao, OrderPolicyEntity> implements OrderPolicyService {

    @Autowired
    private OrderPolicyDao orderPolicyDao;

    /**
     * @param orderPolicyEntity
     * @return
     * @description 添加一条记录
     * @author wkangle
     * @time 2021/09/08 0008 8:58
     * @exception/throws
     */
    @Override
    public int insert(OrderPolicyEntity orderPolicyEntity) {
        return orderPolicyDao.insert(orderPolicyEntity);
    }

    /**
     * @param params 查询条件
     * @return
     * @description 根据查询条件查询服务单保单信息
     * @author wkangle
     * @time 2021-09-08 16:19:08
     * @exception/throws
     */
    @Override
    public OrderPolicyEntity getOneByParams(Map<String, Object> params) {
        return orderPolicyDao.getOneByParams(params);
    }

    /**
     * @param orderPolicyEntity
     * @return
     * @description 更新
     * @author wkangle
     * @time 2021-09-12 15:19:36
     * @exception/throws
     */
    @Override
    public int update(OrderPolicyEntity orderPolicyEntity) {
        return orderPolicyDao.update(orderPolicyEntity);
    }
}
